package com.kgame5.xtank3d.app.view {
import com.kgame5.xtank3d.app.AppEnum;
import com.kgame5.xtank3d.app.view.gbook.GameBookMediator;

import org.puremvc.as3.interfaces.INotification;
import org.puremvc.as3.patterns.mediator.Mediator;

import flash.display.MovieClip;

/**
 * @author kk
 */
public class AppMediator extends Mediator{
	private static const NAME:String="AppMediator";
	
	public function AppMediator(mc:MovieClip){
		super(NAME);
		
		////////////////////////////
		//初始化一下aswing,这些要在实际界面被做之前做好
		
		//AsWingManager.initAsStandard(mc);//?
		//-设置aswing皮肤,来自flash
		//var ClassRef:Class=getDefinitionByName("aeon.AeonLAF") as Class;
		//UIManager.setLookAndFeel(new ClassRef());
		
		//-系统自带的皮肤
		//UIManager.setLookAndFeel(new MyLAF());
			
		//FocusManager.setManager(mc.stage, new FocusManager(mc.stage));
		////////////////////////////
		
		//--gameBook 游戏页面，多个页面组成
		facade.registerMediator(new GameBookMediator(mc.mc_book));
		
		//--gpane:一直存在于界面上的面板
		
		//--gframe：弹出的面板
		
		//--gpopupmenu：弹出菜单
		
		//--声音
		//facade.registerMediator(new SoundEffMediator());
	}

	public override function listNotificationInterests() : Array {
		return [AppEnum.INIT_VIEW];
	}
	
	//INIT_VIEW的存在是必要的，必须加载完毕解析完了地址才可以
	public override function handleNotification(e : INotification) : void {
		
		switch(e.getName()){
			case AppEnum.INIT_VIEW:
				

			break;
		}
	}
}//end of class
}
